import { useI18n } from 'vue-i18n'
import { getTenantId } from 'utils/headerToken'
import { enableOptions, userTypeOptions } from 'config/mockData'
export function useMock() {
  const { t } = useI18n()
  const search = [
    {
      field: 'title',
      label: t('keys.Enterprise_name'),
      component: 'Input'
    },
    {
      field: 'publishType',
      label: t('keys.status'),
      component: 'Select',
      lovCode: 'ZCMS.PUBLISH_TYPE'
    },
    {
      field: 'publishTime',
      label: t('keys.full_name'),
      component: 'Input'
    }
  ]
  const searchClumon = [
    {
      field: 'index',
      label: t('keys.serial_no'),
      type: 'index',
      align: 'center',
      prop: 'no',
      width: '60px',
      showOverflowTooltip: true
    },
    {
      label: t('keys.application_codes'),
      width: '',
      field: 'applyCode',
      fixed: 'left',
      showOverflowTooltip: true
    },
    {
      label:  t('keys.status'),
      fixed: 'left',
      field: 'auditStatus',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Enterprise_name'),
      width: '',
      field: 'targetTenantName',
      showOverflowTooltip: true
    },
    {
      label: t('keys.unique_code'),
      width: '',
      field: 'targetTenantCreditCode',
      showOverflowTooltip: true
    },
    {
      label: t('keys.full_name'),
      width: '',
      field: 'applicantName',
      showOverflowTooltip: true
    },
    {
      label: t('keys.address_tel'),
      width: '',
      field: 'applicantPhone',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Mailbox'),
      width: '',
      field: 'applicantEmail',
      showOverflowTooltip: true
    },
    {
      label: t('keys.fileUid'),
      width: '',
      field: 'tenantName',
      showOverflowTooltip: true
    },
    {
      label: t('keys.remark'),
      width: '',
      field: 'applyRemark',
      showOverflowTooltip: true
    },
    {
      label: t('keys.createdTime'),
      width: '',
      field: 'applyTime',
      showOverflowTooltip: true
    },
    {
      label: t('keys.employee_information'),
      width: '',
      field: 'applicantEmpName',
      showOverflowTooltip: true
    },
    {
      label: t('keys.reviewed_by'),
      width: '',
      field: 'auditEmpName',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Review_Comments'),
      width: '',
      field: 'auditRemark',
      showOverflowTooltip: true
    },
    {
      label: t('keys.review_time'),
      width: '',
      field: 'auditTime',
      showOverflowTooltip: true
    },
    {
      field: 'action',
      label: t('keys.operation'),
      width: '120px',
      fixed: 'right',
      slots: {
        header: 'action',
        default: ''
      }
    }
  ]

  const examinePassFormList = [
    {
      title: t('keys.audit_information'),
      list: [
        {
          label: t('keys.Review_Comments'),
          field: 'auditRemark',
          component: 'Input',
          placement: 'bottom',
          componentProps: {
            type: 'textarea',
            maxlength: '200',
            showWordLimit: true
          }
        }
      ]
    },
    {
      title: t('keys.BasicInformation'),
      list: [
        {
          label: t('keys.emp_code'),
          field: 'empNum',
          component: 'Input',
          componentProps: {
            maxlength: '30'
          }
        },
        {
          label: t('keys.emp_full_name'),
          field: 'empName',
          component: 'Input',
          componentProps: {
            maxlength: '30'
          }
        },
        {
          label: t('keys.userType'),
          field: 'empType',
          component: 'Radio',
          options: userTypeOptions(),
          componentProps: {}
        },
        {
          label: t('keys.telephone'),
          field: 'phone',
          component: 'Input',
          componentProps: {}
        },
        {
          label: t('keys.email'),
          field: 'email',
          component: 'Input',
          componentProps: {
            maxlength: '60'
          }
        },
        {
          label: t('keys.gender'),
          field: 'gender',
          component: 'Lov',
          lovCode: 'ZIAM.GENDER',
          componentProps: {}
        },
        {
          label: t('keys.birthday_date'),
          field: 'birthday',
          component: 'DatePicker',
          componentProps: {
            format: 'YYYY-MM-DD',
            valueFormat: 'YYYY-MM-DD HH:mm:ss'
          }
        },
        {
          label: t('keys.employment_status'),
          field: 'officeStatus',
          component: 'Lov',
          lovCode: 'ZIAM.OFFICE_TYPE',
          componentProps: {}
        },
        {
          label: t('keys.status'),
          field: 'enabledFlag',
          component: 'Radio',
          options: enableOptions(),
          componentProps: {}
        }
        // {
        //   label: t('keys.association_user'),
        //   field: 'holdRealName',
        //   component: 'Input',
        //   componentProps: {}
        // }
      ]
    }
  ]
  const examinePassTableList = [
    {
      title: t('keys.Department'),
      show: true,
      code: 'departmentList',
      list: [
        {
          label: t('keys.department_name'),
          width: '',
          field: 'orgName',
          fixed: 'left',
          showOverflowTooltip: true
        },
        {
          label: t('keys.department_code'),
          width: '',
          field: 'orgCode',
          showOverflowTooltip: true
        },
        {
          label: t('keys.org_level'),
          width: '',
          field: 'orgLevel',
          showOverflowTooltip: true
        },
        {
          label: t('keys.primary_company'),
          width: '',
          field: 'firstHrOrg',
          showOverflowTooltip: true
        },
        {
          label: t('keys.secondary_company'),
          width: '',
          field: 'secondHrOrg',
          showOverflowTooltip: true
        },
        {
          field: 'action',
          label: t('keys.operation'),
          width: '160px',
          fixed: 'right',
          slots: {
            header: 'action',
            default: ''
          }
        }
      ]
    },
    {
      title: t('keys.procurement_team'),
      show: true,
      code: 'purchasingList',
      list: [
        {
          label: t('keys.organizationCode'),
          width: '',
          field: 'orgCode',
          fixed: 'left',
          showOverflowTooltip: true
        },
        {
          label: t('keys.purchase_organ'),
          width: '',
          field: 'departmentCode',
          showOverflowTooltip: true
        },
        {
          label: t('keys.procurement_team'),
          width: '',
          field: 'orgName',
          showOverflowTooltip: true
        },
        {
          label: t('keys.status'),
          width: '',
          field: 'enabledFlag',
          showOverflowTooltip: true
        },
        {
          label: t('keys.team_leader'),
          width: '',
          field: 'leaderFlag',
          showOverflowTooltip: true
        },
        {
          field: 'action',
          label: t('keys.operation'),
          width: '160px',
          fixed: 'right',
          slots: {
            header: 'action',
            default: ''
          }
        }
      ]
    },
    {
      title: t('keys.Legalentity'),
      show: true,
      code: 'legalEntityList',
      list: [
        {
          label: t('keys.organizationCode'),
          width: '',
          field: 'orgCode',
          fixed: 'left',
          showOverflowTooltip: true
        },
        {
          label: t('keys.organizationName'),
          width: '',
          field: 'orgName',
          showOverflowTooltip: true
        },
        {
          label: t('keys.organizationType'),
          width: '',
          field: 'orgTypeDesc',
          showOverflowTooltip: true
        },
        {
          label: t('keys.parentOrgName'),
          width: '',
          field: 'parentOrgName',
          showOverflowTooltip: true
        },
        {
          label: t('keys.status'),
          width: '',
          field: 'enabledFlag',
          showOverflowTooltip: true
        },
        {
          field: 'action',
          label: t('keys.operation'),
          width: '160px',
          fixed: 'right',
          slots: {
            header: 'action',
            default: ''
          }
        }
      ]
    },
    {
      title: t('keys.role'),
      show: true,
      code: 'roleList',
      list: [
        {
          label: t('keys.roleCode'),
          width: '',
          field: 'roleCode',
          fixed: 'left',
          showOverflowTooltip: true
        },
        {
          label: t('keys.roleName'),
          width: '',
          field: 'roleName',
          showOverflowTooltip: true
        },
        {
          label: t('keys.status'),
          width: '',
          field: 'enabledFlag',
          showOverflowTooltip: true
        },
        {
          field: 'action',
          label: t('keys.operation'),
          width: '160px',
          fixed: 'right',
          slots: {
            header: 'action',
            default: ''
          }
        }
      ]
    }
  ]

  const identityManagementList = [
    {
      field: 'index',
      label: t('keys.serial_no'),
      type: 'index',
      align: 'center',
      prop: 'no',
      width: '60px',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Enterprise_name'),
      width: '',
      field: 'tenantName',
      fixed: 'left',
      showOverflowTooltip: true
    },
    {
      label: t('keys.emp_name'),
      width: '',
      field: 'empName',
      fixed: 'left',
      showOverflowTooltip: true
    },
    {
      label: t('keys.phone'),
      width: '',
      field: 'empPhone',
      fixed: 'left',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Mailbox'),
      width: '',
      field: 'empEmail',
      fixed: 'left',
      showOverflowTooltip: true
    },
    {
      label: t('keys.role'),
      width: '',
      field: 'roleNames',
      fixed: 'left',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Department'),
      width: '',
      field: 'deptNames',
      fixed: 'left',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Set_default_identity'),
      width: '',
      field: 'defaultEmpFlag',
      fixed: 'left',
      showOverflowTooltip: true
    },
    {
      field: 'action',
      label: t('keys.operation'),
      width: '200px',
      fixed: 'right',
      slots: {
        header: 'action',
        default: ''
      }
    }
  ]

  const businessRecordSearch = [
    {
      field: 'targetTenantName',
      label: t('keys.Enterprise_name'),
      component: 'Input'
    },
    {
      field: 'auditStatus',
      label: t('keys.status'),
      component: 'Select',
      lovCode: 'ZTNT.COMPANY_APPLY_AUDIT'
    }
  ]
  const businessRecordTable = [
    {
      field: 'index',
      label: t('keys.serial_no'),
      type: 'index',
      align: 'center',
      prop: 'no',
      width: '60px',
      showOverflowTooltip: true
    },
    {
      label: t('keys.application_codes'),
      width: '',
      field: 'applyCode',
      fixed: 'left',
      showOverflowTooltip: true
    },
    {
      label: t('keys.status'),
      fixed: 'left',
      field: 'auditStatusCn',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Enterprise_name'),
      width: '',
      field: 'targetTenantName',
      showOverflowTooltip: true
    },
    {
      label: t('keys.unique_code'),
      width: '',
      field: 'targetTenantCreditCode',
      showOverflowTooltip: true
    },
    {
      label: t('keys.full_name'),
      width: '',
      field: 'applicantName',
      showOverflowTooltip: true
    },
    {
      label: t('keys.address_tel'),
      width: '',
      field: 'applicantPhone',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Mailbox'),
      width: '',
      field: 'applicantEmail',
      showOverflowTooltip: true
    },
    {
      label: t('keys.fileUid'),
      width: '',
      field: 'file',
      showOverflowTooltip: true
    },
    {
      label: t('keys.remark'),
      width: '',
      field: 'applyRemark',
      showOverflowTooltip: true
    },
    {
      label: t('keys.createdTime'),
      width: '',
      field: 'applyTime',
      showOverflowTooltip: true
    },
    {
      label: t('keys.employee_information'),
      width: '',
      field: 'applicantEmpName',
      showOverflowTooltip: true
    },
    {
      label: t('keys.reviewed_by'),
      width: '',
      field: 'auditEmpName',
      showOverflowTooltip: true
    },
    {
      label: t('keys.Review_Comments'),
      width: '',
      field: 'auditRemark',
      showOverflowTooltip: true
    },
    {
      label: t('keys.review_time'),
      width: '',
      field: 'auditTime',
      showOverflowTooltip: true
    },
    // {
    //   field: 'action',
    //   label: t('keys.operation'),
    //   width: '120px',
    //   fixed: 'right',
    //   slots: {
    //     header: 'action',
    //     default: ''
    //   }
    // }
  ]
  return {
    search,
    searchClumon,
    examinePassFormList,
    examinePassTableList,
    identityManagementList,
    businessRecordSearch,
    businessRecordTable
  }
}
